Skip to content

fix(application): improve evidence review behavior#14

Merged
andrewDoing merged 2 commits intomainfrom
anvineyard/default-curation-view
Mar 16, 2026
Merged

fix(application): improve evidence review behavior#14
andrewDoing merged 2 commits intomainfrom
anvineyard/default-curation-view

Conversation

@andrewDoing
Copy link
Copy Markdown
Owner

Updated the frontend review pane so Evidence & Review remains the default surface for real selected items, even before trace data exists, and surfaced Expected Tools guidance when no tool calls have been recorded yet. The PR also expanded unit coverage around the new empty-state and expected-tool behaviors.

Changes

Evidence review behavior

The right pane now distinguishes between an unresolved selection state and a real selected item without evidence, which keeps the review flow visible without showing trace details too early.

  • Updated frontend/src/components/app/pages/ReferencesSection.tsx so the evidence pane renders for any non-null selected item.
    • null now represents no current selection or loading and suppresses the evidence pane.
    • undefined remains supported as the omitted-prop case for backward compatibility.
  • Updated frontend/src/components/app/TracePanel.tsx to accept nullable items and keep the panel mounted when an item exists without evidence data.
    • Replaced the previous hard stop with the softer empty state No trace or evidence data available yet.
    • Continued to gate trace-specific sections behind actual evidence data.

Expected tool visibility

Expected tool guidance is now available independently from recorded tool calls so reviewers can inspect rubric-style expectations earlier in the flow.

  • Added an Expected Tools section in frontend/src/components/app/TracePanel.tsx.
  • Grouped expected tools into Required, Optional, and Not Needed buckets.
  • Rendered tool arguments as plain strings or pretty-printed JSON so structured expectations remain readable.

Test coverage

  • Expanded frontend/tests/unit/components/app/pages/ReferencesSection.test.tsx to cover the updated null-selection behavior in single-turn mode.
  • Added coverage for multi-turn items that have no evidence yet but should still show the Evidence & Review surface.
  • Added assertions for expected-tool group labels, tool names, and structured arguments such as refund policy when toolCalls is empty.

Related Issues

None

- render expected tools without tool calls
- restore null selection behavior in references pane
- stop ignoring root public assets

🛠️ - Generated by Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 13, 2026

GTC Backend Unit Test Results

373 tests  ±0   373 ✅ ±0   1s ⏱️ ±0s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 5a6de28. ± Comparison against base commit a69db22.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 13, 2026

GTC Frontend Test Results

291 tests  ±0   291 ✅ ±0   5s ⏱️ ±0s
 44 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 5a6de28. ± Comparison against base commit a69db22.

This pull request removes 3 and adds 3 tests. Note that renamed tests count towards both.
tests/unit/components/app/pages/ReferencesSection.test.tsx ‑ ReferencesSection – generic right pane (Phase 4) > shows RAG compat panel when in single-turn mode
tests/unit/components/app/pages/ReferencesSection.test.tsx ‑ ReferencesSection – generic right pane (Phase 4) > shows TracePanel header when item has expectedTools
tests/unit/components/app/pages/ReferencesSection.test.tsx ‑ ReferencesSection – generic right pane (Phase 4) > shows empty state when multi-turn mode and no evidence or references
tests/unit/components/app/pages/ReferencesSection.test.tsx ‑ ReferencesSection – generic right pane (Phase 4) > shows evidence empty state when item is null in single-turn mode
tests/unit/components/app/pages/ReferencesSection.test.tsx ‑ ReferencesSection – generic right pane (Phase 4) > shows expected-tool details when item has expectedTools without toolCalls
tests/unit/components/app/pages/ReferencesSection.test.tsx ‑ ReferencesSection – generic right pane (Phase 4) > shows the trace empty state when multi-turn mode has no evidence yet

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 13, 2026

GTC Backend Integration Test Results

140 tests  ±0   139 ✅ ±0   46s ⏱️ -2s
  1 suites ±0     1 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 5a6de28. ± Comparison against base commit a69db22.

♻️ This comment has been updated with latest results.

When no item is selected, the right pane now renders the TracePanel
empty state instead of the legacy Search/Selected RAG tabs.  The RAG
compat surface still appears for single-turn items that are actually
selected, and the legacy prop-omitted path remains unchanged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@andrewDoing andrewDoing merged commit af4e78a into main Mar 16, 2026
6 checks passed
@andrewDoing andrewDoing deleted the anvineyard/default-curation-view branch March 16, 2026 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant